Lesson: 24 - Clones

Purpose : Students learn the usage of Clone programming controls and Sprite variables.

Materials Required

Scratch 3.0

Curriculum Content 6.8) Events, 6.8.1) Clones.

Prior knowledge

Students should know Broadcast, Variables and Operators. They should also know the meaning of the English word Clone.

Exercises

Exercise:1



  1. Use the monkey - banana game developed in lessons 20 and 21. Change it so that multiple bananas will be falling but you should use only one Sprite for all the bananas. When the monkey touches the banana the score will increase. If the score reaches 20 the backdrop should change.


  2. Exercise:2



  3. Recreate the first exercise but with multiple different fruits falling. You should use only one sprite. Each fruit will have different scores.

  4. Exercise Video




    Solutions




Teacher's Instruction
  1. Teachers should teach the students about the advantages of clones. Clone control is used to reduce the number of sprites in the code. Less maintenance, less code etc. Like MyBlocks this also brings in Abstraction but at an even higher level.
  2. Teachers should help the students how to add new costumes to the same sprite(A girl sprite can have the fairy costume, witch, tree, etc..)
  3. When cloning, ask the students to observe that each clone can have its own location (i.e. x, y position), its own motion, its own costume and most importantly be executing its own different code.